#ifndef _NVSRAM_H
#define _NVSRAM_H

#include "common_h.h"

#if NVSRAM_DEBUG > 0
#define   nvs_debug         lite_printf
#else 
#define   nvs_debug(fmt,...) 	;
#endif

typedef enum{
	NVS_ID_MAGIC = 0x00,
	NVS_ID_DES,
	
	NVS_ID_ERR
}NVS_ID;

typedef struct {
	NVS_ID id;
	u16 maxSize;		// unit:  bytes	
	u32 oftAddr;
}NVS_PARA;


u8 nvs_write(NVS_ID id, u32 *data, u16 nums);
u8 nvs_read(NVS_ID id, u32 *data, u16 nums);
u8 nvsram_check(void);

#endif

